﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TaiKhoan/TaiKhoanMaster.Master"
    AutoEventWireup="true" ValidateRequest="false" CodeBehind="CNChuyenMuc.aspx.cs"
    Inherits="UserKTXD.TaiKhoan.CNChuyenMuc" %>

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Cập nhật Chuyên mục</title>
    
    <link href="../GREY_BOX/gb_styles.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <script type="text/javascript">
        var GB_ROOT_DIR = "../GREY_BOX/";
    </script>
    <script language="javascript" type="text/javascript">
        function Upload_HinhAnh() {
            var sFileName = document.getElementById('<%=H_AnhDaiDien.ClientID%>').value;
            var url = "../TaiKhoan/UploadImage.aspx?sFileName=" + sFileName;
            return GB_showCenter('Tải ảnh đại diện', url, 220, 500);
        }
        function Insert_Image(imgPath, imgName) {
            document.getElementById('<%=imgViewer.ClientID%>').src = "../" + imgPath;
            document.getElementById('<%=H_AnhDaiDien.ClientID%>').value = imgName;
        } 
    </script>
    <script src="../GREY_BOX/AJS.js" type="text/javascript"></script>
    <script src="../GREY_BOX/AJS_fx.js" type="text/javascript"></script>
    <script src="../GREY_BOX/gb_scripts.js" type="text/javascript"></script>
    <article id="post-206" class="post-206 page type-page status-publish hentry instock">
				<header class="entry-header">
					<h1 class="entry-title"><span>Cập nhật Chuyên mục</span></h1>
				</header>
    <div style="float: right; left: 0">
        <table border="0" width="100%" align="left" cellpadding="0" cellspacing="0">
            <tr>
                <td width="100%" height="105" style="padding-left: 25px">
                    <asp:Image ID="imgViewer" ToolTip="Ảnh Đại Diện" runat="server" ImageUrl="~/Images/no_image.jpg"
                        CssClass="imgviewer" onclick="JavaScript:Upload_HinhAnh()" Width="330" Height="150" />
                </td>
            </tr>
            <tr>
                <td style="padding: 5px; text-align: center;">
                    &nbsp;&nbsp;(Kích vào hình để tải ảnh đại diện)
                </td>
            </tr>
        </table>
    </div>
    <div style="padding: 10px; float: left; width: 50%;">
        <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
        <asp:HiddenField ID="H_AnhDaiDien" Value="" runat="server" />
        <asp:HiddenField ID="H_NgayCapNhat" Value="" runat="server" />
        <asp:HiddenField ID="H_TacGia" Value="0" runat="server" />
        <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="4" height="10">
                </td>
            </tr>
            <tr>
                <td width="20">
                </td>
                <td width="80" class="hrm_title_blue">
                    Tiêu đề tin<font color="red">(*)</font>
                </td>
                <td width="7" class="hrm_title_blue">
                    :
                </td>
                <td width="400">
                    <asp:TextBox ID="txtTieuDeTin" CssClass="hrm_textbox" Width="400px" MaxLength="200"
                        runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="True"
                        ControlToValidate="txtTieuDeTin" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="4" height="4">
                </td>
            </tr>
            <tr>
                <td width="20">
                </td>
                <td width="130" class="hrm_title_blue">
                    Loại Chuyên mục<font color="red">(*)</font>
                </td>
                <td width="7" class="hrm_title_blue">
                    :
                </td>
                <td width="400">
                    <asp:DropDownList ID="cboLoaiChuyenMuc" AutoPostBack="true" OnSelectedIndexChanged="cboLoaiChuyenMuc_Click"
                        CssClass="hrm_combobox" Width="205px" Height="25px" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" SetFocusOnError="True"
                        InitialValue="0" ControlToValidate="cboLoaiChuyenMuc" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="4" height="4">
                </td>
            </tr>
            <tr>
                <td width="20">
                </td>
                <td width="80" class="hrm_title_blue">
                    Sub Chuyên mục
                </td>
                <td width="7" class="hrm_title_blue">
                    :
                </td>
                <td width="230px">
                    <asp:DropDownList ID="cboSubChuyenMuc" Height="25px" CssClass="hrm_combobox" Width="200px" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="4" height="4">
                </td>
            </tr>
            <tr>
                <td width="20">
                </td>
                <td width="80" class="hrm_title_blue">
                    Tóm tắt
                </td>
                <td width="7" class="hrm_title_blue">
                    :
                </td>
                <td width="400">
                    <asp:TextBox ID="txtTomTat" CssClass="hrm_textbox" Width="400px" TextMode="MultiLine"
                        Height="80" runat="server" MaxLength="500"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    <table border="0" width="50%" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="4" height="4">
            </td>
        </tr>
        <tr>
            <td width="20">
            </td>
            <td width="80" class="hrm_title_blue">
                Nội dung<font color="red">(*)</font>
            </td>
            <td width="7" class="hrm_title_blue">
                :
            </td>
            <td width="100%">
                <FTB:FreeTextBox ID="txtContent" ImageGalleryPath="~/Upload" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|InsertImageFromGallery,InsertTable,Preview,WordClean"
                    runat="Server" Width="100%" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" SetFocusOnError="True"
                    ControlToValidate="txtContent" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td colspan="4" height="4">
            </td>
        </tr>
        <tr>
            <td width="20">
            </td>
            <td width="80" class="hrm_title_blue">
                Trạng Thái
            </td>
            <td width="7" class="hrm_title_blue">
                :
            </td>
            <td>
                <asp:CheckBox ID="chkTinNong" Checked="true" runat="server" />
            </td>
        </tr>
        <tr>
            <td colspan="4" height="10">
            </td>
        </tr>
        <tr>
            <td width="20">
            </td>
            <td width="80" class="hrm_title_blue">
                Lượt Xem
            </td>
            <td width="7" class="hrm_title_blue">
                :
            </td>
            <td>
                <asp:TextBox ID="txtLuotXem" CssClass="hrm_textbox" Enabled="false" Text="0" Width="100px"
                    MaxLength="10" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" ForeColor="Red"
                    runat="server" ErrorMessage="Chỉ cho nhập số" Display="Dynamic" ValidationExpression="\d+"
                    ControlToValidate="txtLuotXem"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td colspan="4" height="10">
            </td>
        </tr>
        <tr>
            <td width="20">
            </td>
            <td width="80" class="hrm_title_blue">
                Tags
            </td>
            <td width="7" class="hrm_title_blue">
                :
            </td>
            <td>
                <asp:TextBox ID="txtTag" CssClass="hrm_textbox" Width="200px" MaxLength="200" runat="server"></asp:TextBox>
                <span style="color: Green">Chỉ cách nhau dấu phẩy (,)</span>
            </td>
        </tr>
        <tr>
            <td colspan="4" height="10">
            </td>
        </tr>
        <tr>
            <td width="20">
            </td>
            <td width="80" class="hrm_title_blue">
            </td>
            <td width="7" class="hrm_title_blue">
            </td>
            <td>
                <asp:ImageButton ID="cmdLuu" ImageUrl="~/Images/save.jpg" runat="server" OnClick="cmdLuu_Click" />
                <asp:ImageButton ID="cmdNhapTiep" ImageUrl="~/Images/nhaptiep.jpg" CausesValidation="false"
                    runat="server" OnClick="cmdNhapTiep_Click" />
                <asp:ImageButton ID="cmdQuayLai" CausesValidation="false" ImageUrl="~/Images/quaylai.jpg"
                    runat="server" PostBackUrl="~/TaiKhoan/QLChuyenMuc.aspx" />
            </td>
        </tr>
        <tr>
            <td colspan="4" height="20">
            </td>
        </tr>
    </table>
    </article>
</asp:Content>
